<?php

$modelsPath=$_SERVER['DOCUMENT_ROOT'].'/../application/models';
$viewsPath=$_SERVER['DOCUMENT_ROOT'].'/../application/views/scripts';
$controllersPath=$_SERVER['DOCUMENT_ROOT'].'/../application/controllers';

$database_dev=array(
					'server'=>'localhost',
					'user'=>'root',
					'password'=>'',
					'db'=>'proyecto3'
				);



$database_prod=array(
					'server'=>'80.45.23.1',
					'user'=>'root',
					'password'=>'mypassword',
					'db'=>'proyecto3'
				);

$database=$database_dev;

$privateKey='pdyw73jfjduwenwmslgoghp569475nmfjh3472n';


function __autoload($class_name) 
{
	$modelsPath=$_SERVER['DOCUMENT_ROOT'].'/../application/models';
	$array=explode('_',$class_name);
    $name=$modelsPath.'/';
    for($i=1;$i<count($array)-1;$i++)
    {
    	$name.=$array[$i].'/';
    }
    $name.=$array[count($array)-1].'.php';
	include $name;
}


//
//$config = new Acl_config("setting.ini","production", TRUE);
//
//TRUE:
//echo $config->database->server;
//
//FALSE:
//echo $config['database']['server'];






